/*
 * 
 * LegendShop 多用户商城系统
 * 
 *  版权所有,并保留所有权利。
 * 
 */
package com.legendshop.oa.dao;

import java.util.List;

import com.legendshop.dao.Dao;
import com.legendshop.dao.support.CriteriaQuery;
import com.legendshop.dao.support.PageSupport;
import com.legendshop.oa.model.ProjectMember;

/**
 * The Class ProjectMemberDao. Dao接口
 */
public interface ProjectMemberDao extends Dao<ProjectMember, Long> {
	/**
	 * 根据商城获取列表
	 */
	List<ProjectMember> getProjectMember(String shopName);

	/**
	 * 根据Id获取
	 */
	ProjectMember getProjectMember(Long id);

	/**
	 * 删除
	 */
	int deleteProjectMember(ProjectMember projectMember);

	/**
	 * 保存
	 */
	Long saveProjectMember(ProjectMember projectMember);

	/**
	 * 保存
	 */
	Long saveProjectMember(Long projectId,List<ProjectMember> projectMember);

	/**
	 * 更新
	 */
	int updateProjectMember(ProjectMember projectMember);

	/**
	 * 查询列表
	 */
	PageSupport getProjectMember(CriteriaQuery cq);

	PageSupport<ProjectMember> getProjectMemberByProject(Long projectId, String memberName, String curPageNO);

	/**
	 * 检查成员是否在项目组里
	 * @param username
	 * @param projectId
	 * @return
	 */
	boolean isMemberInProject(String username, Long projectId);

    List<ProjectMember> getProjectBatchMemberByProject(Long projectId);
}
